class foo {
    [key : string] : any;
    constructor (a : string) {
        this [a] = a;
    }
}
console.log (new foo ("a"));
